{{wrap with="page.phtml" into="page_placeholder"}}

<h1>Main page</h1>

<?php

$last_news = lmbActiveRecord::find('News', array('limit' => 2, 'sort' => array('date' => 'DESC')));

?>

{{list using="$last_news" as="$item"}}
  {{list:item}}
  <table>
  <tr>
    <td>{$item.date}</td>
    <td>{$item.title}</td>
  </tr>
  <tr>
    <td colspan='2'>{$item.annotation}
    <a href="{{route_url params='controller:news,action:detail,id:{$item.id}'}}">more...</a>
    </td>
  </tr>
  </table>
  <hr/>
  {{/list:item}}
  <a href="{{route_url params='controller:news'}}">all news...</a>
{{/list}}

{{/wrap}}